import http from '@/api/http'

// 登陆
 const getLogin = (data) => {
    return http({
        url: "login",
        method: "get",
        params:data
    })
}

// 退出登陆
 const loginout = (data) => {
    return http({
        url: "/loginout",
        method: "post",
        data:data
    })
}


// 未读消息列表
 const getAllnoread = (data) => {
    return http({
        url: "/allnoread",
        method: "get",
        params:data
    })
}



// 获取好友列表
 const getAlluser = (data) => {
    return http({
        url: "/alluser",
        method: "get",
        params:data
    })
}

// 获取和当前用户的未读聊天记录
 const getthisnoread = (data) => {
    return http({
        url: "/thisusernoread",
        method: "get",
        params:data
    })
}



// 获取和当前用户的未读聊天记录
 const updatamessage = (data) => {
    return http({
        url: "/updatamessage",
        method: "post",
        data:data
    })
}


// 依据新消息的id来获取发送消息的好友的信息
 const getuserdata = (data) => {
    return http({
        url: "/getuserdata",
        method: "get",
        params:data
    })
}

 export {
    getuserdata,
    updatamessage,
    getthisnoread,
    getLogin,
    getAlluser,
    loginout,
    getAllnoread
}






